<?php
/**
 * The template for displaying all single posts and attachments
 *
 * @package WordPress
 * @subpackage Twenty_Sixteen
 * @since Twenty Sixteen 1.0
 */

get_header(); ?>
<div class="con_5">
	<div class="small-nav">
		<?php
		$category = get_the_category();
		$page_data=get_page($page_id);
		
		echo'当前位置：&nbsp;';
		echo'<a href="';
		echo bloginfo('url');
		echo'">首页&nbsp;</a>&nbsp;&nbsp;>&nbsp;';
		echo'<a href="'.$category[0]->cat_url.'">';
		echo $category[0]->cat_name;
		echo'</a>';
		
			
		?>
	</div>
	<div class="txt-page">
		

		<?php
		// Start the loop.
		while ( have_posts() ) : the_post();
		echo'<div class="x-txt"><h2>'.$page_data->post_title.'</h2>';
		echo'<p>'. get_post($id)->post_content.'</p></div>';
		
		echo'<div class="x-nav">';
		if ( is_singular( 'attachment' ) ) {
				// Parent post navigation.
				the_post_navigation( array(
					'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ),
				) );
			} elseif ( is_singular( 'post' ) ) {
				// Previous/next post navigation.
				the_post_navigation( array(
					'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentysixteen' ) . '</span> ' .
						'<span class="screen-reader-text">' . __( 'Next post:', 'twentysixteen' ) . '</span> ' .
						'<span class="post-title">%title</span>',
					'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentysixteen' ) . '</span> ' .
						'<span class="screen-reader-text">' . __( 'Previous post:', 'twentysixteen' ) . '</span> ' .
						'<span class="post-title">%title</span>',
				) );
			}
			echo'</div>';
			// End of the loop.
		endwhile;
		?>
	
	
	
		</div>
	
</div>

<?php get_footer(); ?>